﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernateLibrary.Entities" assembly="NHibernateLibrary">

  <class name="Location" table="LOCATION">

    <!--<id name="Id" column="LOCATIONID">
      <generator class="identity"></generator>
    </id>-->

    <composite-id>
      <key-property name="Id" column="Id" type="Int64">
        <column name="Id" unique="true" not-null="true"/>
      </key-property>
      <key-many-to-one name="CompanyDesignationId" class="CompanyDesignation" >
        <column name="COMPANYDESIGNATIONID" />
        <column name="CompanyId" />
        <column name="DESIGNATION" />
      </key-many-to-one>
      <!--<key-many-to-one name="DesignationId" class="CompanyDesignation" column="DESIGNATION" />-->
      <!--<key-many-to-one name="CompanyId" class="Company" column="CompanyId" />-->
      <!--<key-many-to-one name="CompanyDesignationId" class="CompanyDesignation"  column="COMPANYDESIGNATIONID"/>-->
    </composite-id>
  

    <property name="LocationName" column="LOCATION" type="String" length="100" not-null="true" ></property>

   
  </class>

</hibernate-mapping>